A special case of softmax regression with K=2: (due to the overparameterization property)
http://ufldl.stanford.edu/tutorial/supervised/LogisticRegression/http://ufldl.stanford.edu/tutorial/supervised/SoftmaxRegression/